home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / THIN C 2.0 / Projects / sumFive / sumFive.c next >
Encoding:
C/C++ Source or Header  |  1989-11-28  |  204 b   |  15 lines  |  [TEXT/THIN]

  1. main()
  2. {
  3.     int    i, num, sum;
  4.  
  5.     sum = 0;
  6.     
  7.     for ( i=1; i<=5; i++ )
  8.     {
  9.         printf( "Enter number %d --->", i );
  10.         scanf( "%d", &num );
  11.         sum = sum + num;
  12.     }
  13.  
  14.     printf( "The sum of these numbers is %d.", sum );
  15. }